package com.suse.ecommerce.controller;

import com.suse.ecommerce.pojo.SeckillTime;
import com.suse.ecommerce.service.SeckillTimeService;
import com.suse.ecommerce.uilts.Msg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/seckillTime")
public class SeckillTimeController {
    @Autowired
    private SeckillTimeService seckillTimeService;
    @RequestMapping("/queryAllTime")
    public Msg queryAllTime(){
        List<SeckillTime> seckillTimes = seckillTimeService.querySeckillTime();
        return Msg.success("查询成功").add("seckillTimes",seckillTimes);
    }
}
